<template>
  <div class="home">
    <p>Vite + Vue2 模板</p>
    <p class="text-pink-500">
      {{ $store.getters.username }}
    </p>
    <p>{{ user.username }}</p>
    <p>{{ user.password }}</p>
    <p>{{ username }}</p>
    <p>{{ $store.getters.usernames('getters为方法，接受此为参数') }}</p>
    <h2>测试 ICON</h2>
    <div>
      <SvgIcon name="relationship" style="width: 100px; height: 100px"></SvgIcon>
    </div>
  </div>
</template>
<script>
import { mapState, mapGetters } from 'vuex';
import prettyLog from '@/utils/pretty-log';
const log = prettyLog();
export default {
  computed: {
    ...mapState(['user']),
    ...mapGetters(['username']),
  },
  mounted() {
    log.success('home mounted success !!');
  },
};
</script>
<style scoped lang="less"></style>
